#ifndef SERVER_PTHREAD_H
#define SERVER_PTHREAD_H


#include <iostream>
#include <thread>
#include "server_initial.h"
extern "C"{
    #include <sys/epoll.h>
}


using namespace std;

//监听观战者是否要求退出或掉线
void epoll_watchers(room* watcher);

//添加新的观战者描述符
int epoll_watcher_add(int epwatch, int watcherfd);

//删除要退出或掉线的观战者描述符
int epoll_watcher_del(int epwatch, epoll_event* watcher);

//等待用户选择
void wait_chose(playdata *user);

//等待接收用户登录
void wait_Info(playdata* user);

#endif